<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/css/Ltuangou.css">
    <link rel="stylesheet" href="/css/zk_headerdll.css">
    <script src="/js/jquery-3.4.1.min.js"></script>
    <script src="/js/ejs.js"></script>
</head>

<body>
    <header>
        <div class="top_nov_list">
            <div class="w1200 taXian">
                <div class="top_nov_list_l1">
                    <a href="/html/zk_home.html">首页</a>
                    <a href="/html/Ljy.html?id=sales">好价</a>
                    <a href="/html/Lhaowu.html?id=goods">好物</a>
                    <a href="/html/haodian.html?id=shop">好店</a>
                    <a href="/html/Ltuangou.html?id=tuan" style="color: #f74b44;">团购</a>
                </div>
                <div class="top_nov_list_l2">
                    <a href="/html/zk_sign.html">登录</a>
                    <a href="/html/zk_sign_in.html">注册</a>
                </div>
                <script>

                    var kill = document.querySelector(".top_nov_list_l2")
                    var condition = /\/.+\//
                    var arr = document.cookie.match(condition)
                    var user = ""
                    arr != null ? (function () {
                        arr.forEach(function (item) {
                            user = item.includes("user") ? item : ""
                        })
                        user = user.substring(user.indexOf("user=") + 5, user.length - 1)
                        if (user) {
                            kill.innerHTML = `
                            <a href="/html/zk_sign.html" class="user">${user}</a>
                            <a href="javascript:tuichu();">退出</a>`
                        }
                    })() : user = ""
                    function tuichu() {
                        var time = new Date()
                        time.setDate(time.getDate() - 1)
                        console.log(time)
                        document.cookie = `/user=${user}/;expires=${time}`
                        setTimeout(function () {
                            location.reload()
                        }, 800)
                    }
                </script>
                <script>
                    $(window).scroll(function () {
                        if ($("html").scrollTop() > 50) {
                            $(".top_nov_list").css("position", "fixed")
                        } else {
                            $(".top_nov_list").css("position", "relative")
                        }
                    })
                </script>
                <a href="">爆料投稿</a>
            </div>
        </div>
        <div class="top_nov_box">
            <div class="w1200 taXian">
                <div class="top_logo">
                    <a href="zk_home.html">
                        <img src="../img/zk_logo.png" alt="">
                    </a>
                    <p>团购</p>
                </div>
                <div class="top_inpu">
                    <form action="" class="taXian">
                        <div>
                            <input type="text" placeholder="请输入搜索关键字">
                        </div>
                        <input type="button" class="butt_box">
                    </form>
                    <script>
                        $(".top_inpu .butt_box").click(function (e) {
                            e.preventDefault()
                            location.href = `https://ai.taobao.com/search/index.htm?key=${$(".top_inpu div>input").val()}`
                        })
                    </script>
                    <ul class="top_inpu_nov">
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E9%259B%25AA%25E7%25BA%25BA%25E8%25A1%25AB%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">雪纺衫</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E5%25A5%25B3%25E5%258C%2585%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">女包</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E5%2587%2589%25E9%259E%258B%25E6%2596%25B0%25E5%2593%2581%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">凉鞋新品</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E7%259F%25AD%25E8%25A2%2596T%25E6%2581%25A4%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">短袖T恤</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E5%258D%258A%25E8%25BA%25AB%25E8%25A3%2599%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">半身裙</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E8%2596%2584%25E4%25B8%2583%25E5%2588%2586%25E8%25A3%25A4%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">薄七分裤</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E5%25B8%2586%25E5%25B8%2583%25E9%259E%258B%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">帆布鞋</a>
                        </li>
                        <li><a
                                href="http://redirect.simba.taobao.com/rd?f=http%3A%2F%2Fai.taobao.com%2Fsearch%2Findex.htm%3Fkey%3D%25E5%2587%2589%25E5%25B8%25AD%26pid%3Dmm_425760018_530150242_109137150485%26tmall%3Dtrue%26unid%3Dzm%26source_id%3Dtdj_search&amp;w=unionapijs&amp;p=mm_425760018_530150242_109137150485&amp;b=display_601_0_0_0_0&amp;c=cn&amp;pvid=0_0_0&amp;k=317b874644f98ccc">凉席</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </header>
    <div class="lunbo">
        <div class="lunbotu">
            <img src="/img/ljy001.jpg" alt="">
            <img src="/img/ljy002.jpg" alt="">
            <img src="/img/ljy003.jpg" alt="">
        </div>

        <ul>
            <li></li>
            <li></li>
            <li></li>
        </ul>
        <span class="left"></span>
        <span class="right"></span>

    </div>

    <div class="tejia">
        <div class="tejia-tou">
            <img src="/img/ljy005.png" alt="">
        </div>
       


        <div class="tejia-content">

        </div>

    </div>
    <div class="list-content">
        <div class="fenlei">
            <strong class="fenlei1">分类：</strong>
            <div class="fenlei-cont">
                <a href="">全部</a>
                <a href="">手机</a>
                <a href="">笔记本电脑</a>
                <a href="">超极本</a>
                <a href="">台式电脑</a>
                <a href="">平板电脑</a>
                <a href="">液晶显示器</a>
                <a href="">主板</a>
                <a href="">cpu</a>
                <a href="">显卡</a>
                <a href="">平板电视</a>
                <a href="">数码相机</a>
                <a href="">数码摄像机</a>
                <a href="">镜头</a>
                <a href="">空气净化器</a>
                <a href="">智能手表</a>
                <a href="">空调</a>
                <a href="">冰箱</a>
                <a href="">洗衣机</a>
            </div>
            <span class="more shang">
                更多
                <i class="shang"></i>
            </span>
        </div>
        <div class="xuanrantu">


        </div>
    </div>
    <footer>
        <div class="w1200 taXian">
            <div class="foo_left">© 2020 中关村在线 版权所有</div>
            <ul class="foo_right taXian">
                <li><a href="">公司简介</a></li>
                <li><a href="">公司历程</a></li>
                <li><a href="">营销推广</a></li>
                <li><a href="">媒体合作</a></li>
                <li><a href="">品牌大全</a></li>
                <li><a href="">注册账号</a></li>
                <li><a href="">招聘信息</a></li>
                <li><a href="">联系方式</a></li>
                <li><a href="">隐私声名</a></li>
                <li><a href="">站点地图</a></li>
                <li><a href="" style="border-right:none">反馈纠错</a></li>
            </ul>
        </div>
        <div class="go_top">
            <script>
                $(window).scroll(function () {
                    if ($("html").scrollTop() > 400) {
                        $(".go_top").css("display", "block")
                    } else {
                        $(".go_top").css("display", "none")
                    }
                })
                $(".go_top").click(function () {
                    $("html").animate({ scrollTop: 0 }, 1000)
                })
            </script>
        </div>
    </footer>
</body>

<script type="text/html" id="box">
<% for(var i = 0; i < 5; i++){ %>
 
    <div class="tejia-conts">
        <img src="<%= data[i].img_src %>" alt="">
        <div class="desc"><%= data[i].title %></div>
        <div class="price"><%- data[i].price %></div>

      </div>
  
<% } %>

</script>

<script type="text/html" id="bot">
    <% for(var n = 11; n < 34; n++){ %>
     
        <div class="xuanran-conts">
            <img src="<%= data1[n].img_src %>" alt="">
            <div class="xuanran-desc"><%= data1[n].title %></div>
            <div class="xuanran-price"><%- data1[n].price %></div>
    
          </div>
      
    <% } %>
    
    </script>

<script>
     var href = location.href;
        console.log(href);
        var bmc = href.substring(href.indexOf("id=") + 3);
        console.log(bmc);
    $.get("/php/Ltuangou.php", {id: bmc}, function (re) {
        var data = JSON.parse(re);
        console.log(data);

        var html = ejs.render($("#box").html(), { data: data })
        $(".tejia-content").html(html);
    });


    $.get("/php/Ltuangou.php", {id: bmc}, function (res) {
        var data1 = JSON.parse(res);
        console.log(data1);

        var htm = ejs.render($("#bot").html(), { data1: data1 })
        $(".xuanrantu").html(htm);
    });



</script>






<script>
    var i = 0;
    var time = setInterval(text, 2000);
    function text() {
        i++;
        if (i == $(".lunbo img").length) {
            i = 0;
        }
        $(".lunbo img").eq(i).show().siblings().hide();
        $(".lunbo li").eq(i).css("background", "#fff").siblings().css("background", "transparent")
    }

    $(".lunbo li").click(function () {
        i = $(this).index();
        $(".lunbo img").eq(i).show().siblings().hide();
        $(".lunbo li").eq(i).css("background", "#fff").siblings().css("background", "transparent")
    })
    $(".right").click(text);
    $(".left").click(function () {
        i--;
        if (i < 0) {
            i = $(".lunbo img").length - 1;
        }
        $(".lunbo img").eq(i).show().siblings().hide();
        $(".lunbo li").eq(i).css("background", "#fff").siblings().css("background", "transparent")

    })
    $(".lunbo").mouseenter(function () {
        clearInterval(time)
    })
    $(".lunbo").mouseleave(function () {
        time = setInterval(text, 2000)
    })


    
    $(".more .shang").click(function () {

        $(".shang").css(" backgroundPosition", "-40PX -15PX");

        $(".fenlei").css("height", "80px");
    })
</script>

</html>